<template>
	<view class="batch" @touchmove.stop.prevent="moveHandle">
			<view class="disalog-box">
				<view class="title-box">
					<view class="title">
						批次信息
					</view>
					<view class="close" @click="close">
						关闭
					</view>
				</view>
				<scroll-view class="scroll-box" scroll-y>
					<view class="disalog-content" v-if="info.materialBatchDTOs" v-for="(item,index) in info.materialBatchDTOs" :key="index">
						<view class="content-item">
							批次：{{item.batchNo}}
						</view>
						<view class="content-item">
							收货数量：{{item.number}}
						</view>
						<view class="content-item">
							仓位：{{item.storehouseNo}}
						</view>
					</view>
					<view class="disalog-content" v-if="batchArray.length > 0" v-for="(item,index) in batchArray" :key="index">
						<view class="content-item">
							批次：{{item.batchNo}}
						</view>
						<view class="content-item">
							收货数量：{{item.number}}
						</view>
						<view class="content-item">
							仓位：{{item.storehouseNo}}
						</view>
					</view>
				</scroll-view>
			</view>
	</view>
</template>

<script>
	export default {
		props:{
			info:{
				type:Object,
				default:{}
			},
			batchArray:{
				type:Array,
				default:[]
			},
		},
		data() {
			return {
				
			}
		},
		methods: {
			moveHandle(){
				return;
			},
			close:function(){
				this.$emit('close');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.batch{
		width:100%;
		height: 100vh;
		position: fixed;
		top:0;
		left: 0;
		background: rgba(0,0,0,0.6);
		.disalog-box{
			background-color: white;
			border-radius: 10rpx;
			position: absolute;
			top:50%;
			left: 50%;
			animation-name: disalogshow;
			animation-duration: 0.5s;
			width: calc(100% - 180rpx);
			transform: translate(-50%,-50%);
			box-sizing: border-box;
			padding: 20rpx;
			.title-box{
				position: relative;
				font-size: 28rpx;
				.title{
					text-align: center;
				}
				.close{
					position: absolute;
					right: 0;
					top: 0;
				}
			}
			.scroll-box{
				max-height: 80vh;
			}
			.disalog-content{
				margin-top: 40rpx;
				.content-item{
					font-size: 28rpx;
					line-height: 60rpx;
				}
			}
		}
	}
	@keyframes disalogshow {
		0% {
			transform:translate(-50%,-60%);
			// transform: scale(0);
			opacity: 0;
		}
	
		100% {
			transform: translate(-50%,-50%);
			// transform: scale(1);
			opacity: 1;
		}
	}
</style>
